GetDialogItem
CHANGED WITH THE APPEARANCE MANAGER
Gets a handle to a dialog item.
pascal void GetDialogItem ( DialogPtr theDialog, short itemNo, short *itemType, Handle *item, Rect *box);
theDialog- A pointer to a dialog structure.
itemNo- The item number (a number corresponding to the position of an item in the dialog box's item list resource); use
FindDialogItemto determine this value.itemType- On output, a pointer to a dialog item constant identifying the item type of the item requested in the
itemNoparameter.item- A pointer to a handle that, on output, will refer to the item specified in the
itemNoparameter or, for application-defined draw functions, a pointer (coerced to a handle) to the draw function.box- On output, a pointer to the rectangle that specifies the display rectangle (described in coordinates local to the dialog box), for the item specified in the
itemNoparameter.DISCUSSION
TheGetDialogItemfunction produces the item type, a handle to the item (or, for application-defined draw functions, the function pointer), and the display rectangle for a specified item in an item list resource. When a control hierarchy is present in the dialog,GetDialogItemcan gets the appropriate information (for example, a text handle) from the controls. If you wish to get a control handle for a dialog item in an embedding hierarchy, seeGetDialogItemAsControl.You should call
GetDialogItembefore calling functions such asSetDialogItemTextthat need a handle to a dialog item.SEE ALSO
SetDialogItem.WHEN THE APPEARANCE MANAGER IS NOT AVAILABLE
An embedding hierarchy cannot be established in a dialog box.